#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

int main() {
    // parse input 
    vector<int> tree;
    
    int back_time;
    while (cin.peek() != '\n') {
        cin >> back_time;
        tree.push_back(back_time);
    }
    tree.pop_back();

    // search K in [1, max{tree}-1]
    int begin = 1;
    int end = (*max_element(tree.begin(), tree.end()));
    int mid;
    int time;
    while (begin < end) {
        time = 0;
        mid = (begin+end) / 2;
        for (auto i:tree) {
            // time += (i/mid+1);
            time += (int)ceil(i/mid);
        }
        if (time < back_time) {
            end = mid;
        } else {
            begin = mid + 1;
        }
    }
    cout << begin;
}